home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / graphics / 3dvect37.zip / OBJECTS.INC < prev    next >
Text File  |  1994-06-22  |  67KB  |  1,703 lines

  1. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  2. ;
  3. ; Filename     : objects.inc
  4. ; Included from: Main.asm
  5. ; Description  : Some sample objects for 3dVect.zip
  6. ;
  7. ; Written by: John McCarthy
  8. ;             1316 Redwood Lane
  9. ;             Pickering, Ontario.
  10. ;             Canada, Earth, Milky Way (for those out-of-towners)
  11. ;             L1X 1C5
  12. ;
  13. ; Internet/Usenet:  BRIAN.MCCARTHY@CANREM.COM
  14. ;         Fidonet:  Brian McCarthy 1:229/15
  15. ;   RIME/Relaynet: ->CRS
  16. ;
  17. ; Home phone, (905) 831-1944, don't call at 2 am eh!
  18. ;
  19. ; John Mccarthy would really love to work for a company programming Robots
  20. ; or doing some high intensive CPU work.  Hint. Hint.
  21. ;
  22. ; Send me your protected mode source code!
  23. ; Send me your Objects!
  24. ; But most of all, Send me a postcard!!!!
  25. ;
  26. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  27.  
  28. ;          include knight.inc
  29. ;          include stuka.inc
  30. ;          include tank.inc
  31.            include acad1.inc
  32.  
  33. setupbase:
  34.            mov objbase[0*4],offset headercube4
  35.            mov objbase[1*4],offset headercube2
  36.            mov objbase[2*4],offset headerring
  37.            mov objbase[3*4],offset headerdiamond
  38.            mov objbase[4*4],offset headerrubine
  39.            mov objbase[5*4],offset column
  40.            mov objbase[6*4],offset archmiddle
  41.           ;mov objbase[7*4],offset archend
  42.           ;mov objbase[8*4],offset bigoildrum
  43.           ;mov objbase[9*4],offset ship1
  44.            mov objbase[5*4],offset headercube3
  45.            mov objbase[6*4],offset headerarm
  46.  
  47.           ;mov objbase[0*4],offset platform1
  48.           ;mov objbase[1*4],offset platform2
  49.           ;mov objbase[2*4],offset platform3
  50.           ;mov objbase[3*4],offset ship1
  51.  
  52.           ;mov objbase[0*4],offset headerknight
  53.           ;mov objbase[0*4],offset stuka
  54.           ;mov objbase[0*4],offset turret
  55.           ;mov objbase[0*4],offset futurecrewrip1
  56.           ;mov objbase[0*4],offset formula
  57.           ;mov objbase[0*4],offset inca
  58.            mov objbase[0*4],offset hacad1
  59.           ;mov objbase[1*4],offset hacad1
  60.           ;mov objbase[2*4],offset hacad1
  61.           ;mov objbase[3*4],offset hacad1
  62.           ;mov objbase[4*4],offset hacad1
  63.           ;mov objbase[5*4],offset hacad1
  64.           ;mov objbase[6*4],offset hacad1
  65.           ;mov objbase[7*4],offset hacad1
  66.  
  67.            mov esi,0               ; from object #
  68.            mov edi,6               ; to object #
  69.            call set_up_all_lambert ; find and set up shading tables
  70.  
  71.            ret
  72.  
  73. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  74. ; Shape data can be almost as large as you need it 'till it crashes. Try a cube
  75. ; 20000x20000x20000.    Calculations  use  32  bit  registers  and  can  handle
  76. ; up to 16 bit locations.  Keeping the object size small will  allow  a  larger
  77. ; visible space.  But larger objects will allow you to get  closer  with   more
  78. ; accuracy in the mathematics of rotations.  Remember, if you make a really big
  79. ; object, set minz to the largest object on the screen so the large object wont
  80. ; mess up when you get really close to it.  I have generally found that  larger
  81. ; objects "look" better as they have great mathematical resolution.
  82. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  83. ;
  84. ; Format for objects:
  85. ;
  86. ; headerthing:
  87. ;  dd max,min    ; max = maximum distance object can be seen, min = closest
  88. ;                ; distance object is allowed to be seen (can be negative)
  89. ;                ; eg dd 5000000,200.  If negative, object must be made up
  90. ;                ; of only sub-objects!!!
  91. ;  dd res1       ; distance for resolution1, eg 6000
  92. ;  dd offset thing1 - offset $ - 4  ; pointer to resolution1
  93. ;  dd -1         ; last resolution flag
  94. ;  dd offset thing2 - offset $ - 4  ; pointer to resolution2
  95. ;
  96. ; thing1:
  97. ;  dw xx         ; number of points
  98. ;  dw yy         ; number of surfaces
  99. ;  dw 25 dup (0) ; 25 future use words/options
  100. ;
  101. ;  dw xx,yy,zz   ; x,y,z of point 0
  102. ;  dw xx,yy,zz   ; x,y,z of point 1
  103. ;  dw xx,yy,zz   ; x,y,z of point 2
  104. ;  ...
  105. ;
  106. ;  dw command
  107. ;  dw texture for side 1
  108. ;  dw texture for side 2
  109. ;  dw colour for side 1
  110. ;  dw colour for side 2
  111. ;  dw connection data eg (1,2,3,4,1)
  112. ;  dw [?,?,?] [optional surface normal if command 128 used]
  113. ;  dw more connection data...
  114. ;
  115. ; to re-cap: dw command,texture1,texture2,colour1,colour2,connection,[0,0,0]
  116. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  117. ;
  118. ; List of texture bits to date: (options grouped by function:)
  119. ;
  120. ; Note: "visible" = "points appear counter-clockwise"
  121. ;
  122. ; Texture definitions:
  123. ;
  124. ;   0       - normal surface, no features, constant colour.
  125. ;   wavey   - steel texture for surface 0 = none,  colour  offset  determines
  126. ;             screen offset for texture.  eg 16+7 will use colour block 16-31
  127. ;             but make the sine wave texture 14 (7*2) lines down. this is  so
  128. ;             all sine wave textures do not appear on the same line.  Windows
  129. ;             and engines look good with this feature.  This  option  can  be
  130. ;             combined with shading  if  you  want  to  mis-align  sine  wave
  131. ;             patterns.
  132. ;   shade   - lambert shading bit, must have normal calculated or  at  least
  133. ;             have    free    space     for    pre_cal_lambert    to    use:
  134. ;             eg x,x,x,x,x,1,2,3,1,?,?,?<- these 3 words are surface normal!
  135. ;   inverse - inversion bit for shading option.  0=normal shading, 1=inverse
  136. ;             inversion automatically occures when other side is displayed.
  137. ;   glow    - =shade+inverse
  138. ;   last    - colour has same colour as previous surface (used when
  139. ;             you want gourad shading, but want to avoid  duplicate
  140. ;             calculations - don't set gourad bit if this  is  what
  141. ;             you use it for.) when this is used, the colour number
  142. ;             determines the new colour block to use.  the  shading
  143. ;             of this colour will be the same as the surface before
  144. ;             it, but the colour block can be different.
  145. ;   mesh    - see the line below? that sort if dot on/dot off thing? thats a
  146. ;             mesh texture.  can be combined with shading.
  147. ;   glenz   - glenz vector (you know, the stained glass type of  thingy)
  148. ;             The colour of surface refers to a cross referanced palette
  149. ;             from which the glenz polygon will derive it's new colours.
  150. ;             Put the cross referancing palette  offset  into  xreftable
  151. ;             and make the colour index the palette in the table.  Glenz
  152. ;             vectors can be used with the shading  option  to  get  the
  153. ;             same type of effect as in  Second  Unreal.   Shaded  Glenz
  154. ;             Vectors are made by simply having multiple cross referance
  155. ;             palettes and setting the surface to  "shade".   This  will
  156. ;             select the appropriate table based on surface normal. This
  157. ;             option can be combined with shading.
  158. ;   stone   - this texture is like the stone texture I saw  in Alone In The
  159. ;             Dark.   The   stone   texture   offset    is    loaded   from
  160. ;             [stonetbl+colour*4].  Use the Qbasic  program   stone.bas  to
  161. ;             generate more stone textures with different colours or ranges
  162. ;             This option can be combined with shading.
  163. ;
  164. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  165. ;
  166. ; Commands:
  167. ;
  168. ;   point   - defines a single point; must be repeated! eg dw 64,col,3,3
  169. ;   line    - if used, defines a line (must be set to define a true line)
  170. ;   himap   - if set, defines a bitmap,eg: point #, bitmap #, x scale,y scale
  171. ;   lomap   - uses 1/4 scaled bitmap (every 4'th pixel is sampled), fast
  172. ;
  173. ;   iterate - generate iteration if side visible (iteration = sub-object)
  174. ;   matrix  - modify matrix when generating iteration.  matrix object
  175. ;             offset is 3rd word (6'th byte) in future use words.
  176. ;
  177. ;   both    - side is always visible no matter angle, skips counter-clowise test
  178. ;           - "both sides have same texture"
  179. ;   double  - side is always visible but other side has other colour
  180. ;             "double sided surface"
  181. ;             note: if this is used, option "both" must not be used!!
  182. ;   onscr   - test if side is on screen - don't use if all points are
  183. ;             outside clipping parameters.
  184. ;   check   - dont plot this side, just use as test points for visibility.
  185. ;             this is mostly used with iterations.
  186. ;   gosub   - push current offset and go to another location (offset location - offset $)
  187. ;   return  - just like a qbasic return
  188. ;   goto    - like qbasic - go to another offset (offset location - offset $)
  189. ;   push_matrix        - push rotation matrix
  190. ;   pop_matrix         - pop rotation matrix
  191. ;   push_location      - push 3d centriodal location
  192. ;   pop_location       - pop 3d centroidal location
  193. ;   sub_object         - sub_object = matrix+check+iteration+both,?,?,?,?,0,0
  194. ;   static_sub_object  - non-rotatable sub_object = check+iteration+both,?,?,?,?,0,0
  195. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  196. ;
  197. ; There are two kinds of bitmaps and points.  Those which  are  inside  objects
  198. ; and those which are seperate objects themselves. If userotate object  command
  199. ; is set to 32 or 64, then the entire object is considered to be either a point
  200. ; or bitmap.  But if userotate is not set this way, then  a  normal  object  is
  201. ; drawn and bitmaps then come from within the object definitions (below).  this
  202. ; way, bitmaps and points can be either part of a larger object,  or  they  are
  203. ; computed fast on their own. (eg explosions and bullets as  seperate  objects)
  204. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  205. ;
  206. ; Note: when writing surface descriptions, try to make the  first value unique
  207. ; from any other first value.  This way, the sort routine  will  give  a  more
  208. ; accurate sorting of sides. eg 1,3,6,1  2,4,1,2  rather than 1,3,6,1  1,2,4,1
  209. ; If this doesnt give you what you want, then try making the first two  points
  210. ; the farthest points from the objects centroid.
  211. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  212. ;
  213. ; To recap:
  214. ;
  215. ;        0 = constant colour, only visible from counter-clockwise side
  216. ;    wavey = sine texture
  217. ;    shade = shading - requires 3 blank words for surface normal eg dw 0,0,0
  218. ;  inverse = invert the shading direction, 0=normal, 1=sun is other way.
  219. ;     last = use intensity from previous surface (not colour, only intensity)
  220. ;     mesh = see through mesh - solid colour
  221. ;    glenz = cross referancing vector - load from screen, xrefs it, put back
  222. ;    stone = stone texture.  use stone.bas to make more textures.
  223. ;
  224. ;    point = point
  225. ;     line = line
  226. ;    himap = bitmap (scalable, non-rotatable)
  227. ;    lomap = bitmap (scalable, non-rotatable)
  228. ;  iterate = generate iteration if side visible
  229. ;     both = always visible
  230. ;   double = always visible but other side has high byte colour,"double sided"
  231. ;    onscr = plot side only if all the following points are on the screen
  232. ;    check = dont plot side but use the following points as a test for visiblity
  233. ;
  234. ; What you can't mix on a single surface: "double" with "both"!!
  235. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  236. ;
  237. ; You do not have to define a point for the center of the  object.  the  point
  238. ; 0 defines the center of the object.  This is different from earlier versions
  239. ; This point will ALWAYS be calculated and will always be the zero'th point.
  240. ;
  241. ; Iterations may or may not have an extra centroid point calculated  for  you.
  242. ; Whether or not a new point is added to  the  points  list  is  dependant  on
  243. ; whether or not a new centroid must be calculated.  Hmmm, how  can  I explain
  244. ; this...Ok, centroids are calculated with new maxtricies or centroid offsets,
  245. ; they are also calculated if the centroid flag is set (4'th word).  So,  what
  246. ; does this mean to the lowly reader (you).  Some examples of iterations where
  247. ; new points are added to points list.
  248. ;
  249. ; Eg:
  250. ;  an iteration where new centroid IS NOT calculated and IS NOT inserted
  251. ;
  252. ;   dw iteration,0,0,colour,0 ,1,2,3,4,1
  253. ;       dw 1,1
  254. ;       dw 25 dup (0)
  255. ;          x y z
  256. ;       dw 5,5,5                 ; point 20 (for example)
  257. ;       dw 0,0,0,colour, 20,5,20 ; notice how this surface uses newly created point
  258. ;
  259. ;  an iteration where new centroid IS calculated and IS inserted
  260. ;
  261. ;   dw iteration+matrix,0,0,colour,0 ,1,2,3,4,1
  262. ;       dw 1,1
  263. ;       dw 25 dup (0)
  264. ;          x y z
  265. ;       dw 5,5,5                 ; point is now 21 (because matrix calculated new centroid)
  266. ;       dw 0,0,0,colour, 21,5,21 ; same surface as above.
  267. ;
  268. ; The "sub_object" command also forces a centroid to be calculated, and will
  269. ; also insert a new point into the points list.  Be aware of it's presance!
  270. ;
  271. ; Note: The centroid is always calculated as the zero'th point. The above rules
  272. ; only apply to whether or not a new centroid will appear  as  an  EXTRA  point
  273. ; in an ITERATION.
  274. ;
  275. ; Questions to ask yourself in trying to figure out the above text:
  276. ;   Have I made an iteration that has any centroidal offset?
  277. ;   Have I used the matrix command?
  278. ;   Hahe I used the sub_object command?
  279. ;   Have I set bit 0 of the 4'th word in the 25 dup's to 1?
  280. ;   Am I sexually frustrated?
  281. ; If you answer yes to any of these questions, then a new centroidal point will
  282. ; be calculated and inserted into the points list even if you dont ask for it!
  283. ;
  284. ; If you want to negate the effects of centroid  point  insertion,  simply  set
  285. ; the 8'th word (16'th byte) in those 25 dup's to 1. See below for more info.
  286. ;
  287. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  288. ;
  289. ; Here is a simple rundown of what those 25 extra words do:
  290. ;
  291. ;  dw x,y ; x=number of points,y=number of surfaces (but you knew that right?)
  292. ;
  293. ;  dw ? ; reserved for memory offset if an iteration is skipped   (leave blank)
  294. ;  dw ? ; reserved for point offset if an iteration is skipped    (leave blank)
  295. ;  dw ? ; reserved,is there a new center of gravity to calculate? (leave blank)
  296. ;       ; you could force this value to 1 (centroid in equ.inc) if you  wanted
  297. ;       ; to have a new centroid calculated with the iteration.
  298. ;  dw x,y,z ; new center-of-gravity point.  lets say you want a  subsurface  to
  299. ;           ; be offset by a certin spacial location, you can set these 3 words
  300. ;           ; to be "added" to any points you  are  adding  to  the  sub-object
  301. ;           ; listen bub, just mess around with it and you'll get  the  idea...
  302. ;  dw #     ; new load object offset for matrix compounding - this is only used
  303. ;           ; if the sub-object has a new matrix. (for rotation). commands like
  304. ;           ; matrix and sub_object access this word to determine where  in the
  305. ;           ; object lists (xs,ys,zs,xadds,zadds...) to  get  the  location and
  306. ;           ; rotation information about  the  sub-object.  check out the block
  307. ;           ; with the two smaller rotating  blocks  and  then look in main.asm
  308. ;           ; to figure out how to use this.  usual  values are 1 or 2, maybe 3
  309. ;           ; up to the number of extra sub_objects you've got.
  310. ;  dw #     ; connection data addition value.  this value  gets  added  to  the
  311. ;           ; connection data. eg: lets say you've got an object that starts at
  312. ;           ; point 3 and goes to 12, but you want to make it into a sub_object
  313. ;           ; (part of something larger) and you  want to change the connection
  314. ;           ; data to have a range of 25 to  36.  just put the value 22 in here
  315. ;           ; and all connection  data  within the object (and all sub_objects,
  316. ;           ; even in  sub_objects  within  sub_objects)  will  have this value
  317. ;           ; added to it.  this is usefull for, lets say,  making  a formation
  318. ;           ; of airplanes one big object instead  of  drawing  each individual
  319. ;           ; airplane. (if by some freak accident you wanted to do that)
  320. ;  dd #     ; maximum distance object can be seen (maxz)
  321. ;  dd #     ; minimum distance object can be seen (minz) - this can be negative
  322. ;           ; if you want.  but if it is  negative,  the  entire   object  must
  323. ;           ; be made up of sub-objects.  If these are left at zero, they  will
  324. ;           ; be forced to good values (pre_cal_lambert does this).
  325. ;  dd #     ; screen tolerancing.  this is used to determine how  far  off  the
  326. ;           ; screen an object will remain visable.  past this, the object will
  327. ;           ; not be drawn.  try 1, then try 500. you'll  get  the  idea.  (get
  328. ;           ; close to the object.) if this is left  blank,  a  value  will  be
  329. ;           ; placed in for you.
  330. ;  dw 11 dup 0 ; future use bytes
  331. ;
  332. ; To re-cap, the 25 word header looks like this:
  333. ;
  334. ;offset         │length&type    │description
  335. ;───────────────┼───────────────┼──────────────────────────────────────────────
  336. ; 0             │1 word (resrvd)│offset to next iteration (skip entire iteration)
  337. ; 2             │1 word (resrvd)│number of points in entire iteration
  338. ;               │               │
  339. ; 4             │1 word (resrvd)│centroid flag (bit 0)
  340. ; 6             │3 words x,y,z  │new centroid for points (and all following iterations!)
  341. ; 12            │1 word         │"new object angle" matrix load location (from vxs[],vys[]... (single,eg: 1,2,3...)
  342. ; 14            │1 word         │connection data addition value (can be negative!)
  343. ; 16            │1 dword        │maximum distance object can be seen (maxz)
  344. ; 20            │1 dword        │minimum distance object can be seen (minz)
  345. ; 24            │1 dword        │screen tolerancing
  346. ;               │               │
  347. ; 28            │11 words       │future use
  348. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  349.  
  350.            align 16
  351.  
  352. headercube1 dd -1
  353.             dd offset cube1a - offset $ - 4
  354.  
  355. cube1a     dw 8           ; how many points
  356.            dw 6           ; how many surfaces
  357.            dw 25 dup (0)  ; future use
  358.            ;    x   y   z
  359.            dw -270, 270, 270 ;1
  360.            dw -270,-270, 270 ;2
  361.            dw  270,-270, 270 ;3
  362.            dw  270, 270, 270 ;4
  363.            dw -270, 270,-270 ;5
  364.            dw -270,-270,-270 ;6
  365.            dw  270,-270,-270 ;7
  366.            dw  270, 270,-270 ;8
  367.  
  368.            dw 0,0,0,16*9+12 ,0 ,1,2,3,4,1 ; surface connection data, and colours
  369.            dw 0,wavey,0,16*7+6  ,0 ,8,7,6,5,8 ; end point=start point means done side
  370.            dw 0,wavey,0,16*3+9  ,0 ,4,3,7,8,4
  371.            dw 0,shade,0,16*5+0  ,0 ,5,6,2,1,5  ,0,0,0 ;<-- lambert shading
  372.           dw 0,shade,0,16*2+0  ,0 ,5,1,4,8,5  ,0,0,0 ;<-- normal gets shoved
  373.            dw 0,shade,0,16*11+0 ,0 ,2,6,7,3,2  ,0,0,0 ;<-- here, leave blank
  374.  
  375.            public headercube2
  376.  
  377. headercube2 dd -1
  378.             dd offset cube2a - offset $ - 4
  379.  
  380. cube2a     dw 8           ; how many points
  381.            dw 9           ; how many surfaces
  382.            dw 25 dup (0)
  383.            ;    x   y   z
  384.            dw -270, 270, 270 ;1
  385.            dw -270,-270, 270 ;2
  386.            dw  270,-270, 270 ;3
  387.            dw  270, 270, 270 ;4
  388.            dw -270, 270,-270 ;5
  389.            dw -270,-270,-270 ;6
  390.            dw  270,-270,-270 ;7
  391.            dw  270, 270,-270 ;8
  392.  
  393.            dw double,shade,wavey,16*3+0,16*1,1,2,3,4,1,0,0,0 ; command,txt1,txt2,col1,col2, surface connection data
  394.            dw 0,0,0,16*2+4 ,0,6,2,6   ; end point=start point means done side
  395.            dw 0,0,0,16*2+15,0,7,3,7   ; <-- these are lines
  396.            dw 0,0,0,16*2+12,0,8,4,8
  397.            dw 0,0,0,16*3+8 ,0,5,1,5
  398.            dw 0,0,0,16*4+10,0,6,7,6
  399.            dw 0,0,0,16*3+14,0,7,8,7
  400.            dw 0,0,0,16*7+13,0,8,5,8
  401.            dw 0,0,0,16*5+12,0,5,6,5
  402.  
  403. headercube3 dd 6000
  404.             dd offset cube3a - offset $ - 4
  405.             dd -1
  406.             dd offset cube3b - offset $ - 4
  407.  
  408. cube3a     dw 44          ; how many points
  409.            dw 45          ; how many surfaces
  410.            dw 25 dup (0)  ; future use
  411.            ;    x   y   z
  412.            dw -70, 70, 70 ;1
  413.            dw -70, 70, 35 ;2
  414.            dw -70, 70,  0 ;3
  415.            dw -70, 70,-35 ;4
  416.  
  417.            dw -70,-70, 70 ;5
  418.            dw -70,-70, 35 ;6
  419.            dw -70,-70,  0 ;7
  420.            dw -70,-70,-35 ;8
  421.  
  422.            dw  70,-70, 70 ;9
  423.            dw  70,-70, 35 ;10
  424.            dw  70,-70,  0 ;11
  425.            dw  70,-70,-35 ;12
  426.  
  427.            dw  70, 70, 70 ;13
  428.            dw  70, 70, 35 ;14
  429.            dw  70, 70,  0 ;15
  430.            dw  70, 70,-35 ;16
  431.  
  432.            dw -70, 70,-70 ;17
  433.            dw -70, 35,-70 ;18
  434.            dw -70,  0,-70 ;19
  435.            dw -70,-35,-70 ;20
  436.            dw -70,-70,-70 ;21
  437.  
  438.            dw  70, 70,-70 ;22
  439.            dw  70, 35,-70 ;23
  440.            dw  70,  0,-70 ;24
  441.            dw  70,-35,-70 ;25
  442.            dw  70,-70,-70 ;26
  443.  
  444.            dw -70, 35, 70 ;27
  445.            dw -70,  0, 70 ;28
  446.            dw -70,-35, 70 ;29
  447.  
  448.            dw  70, 35, 70 ;30
  449.            dw  70,  0, 70 ;31
  450.            dw  70,-35, 70 ;32
  451.  
  452.            dw -35,-70, 70 ;33
  453.            dw   0,-70, 70 ;34
  454.            dw  35,-70, 70 ;35
  455.  
  456.            dw -35,-70,-70 ;36
  457.            dw   0,-70,-70 ;37
  458.            dw  35,-70,-70 ;38
  459.  
  460.            dw -35, 70,-70 ;39
  461.            dw   0, 70,-70 ;40
  462.            dw  35, 70,-70 ;41
  463.  
  464.            dw -35, 70, 70 ;42
  465.            dw   0, 70, 70 ;43
  466.            dw  35, 70, 70 ;44
  467.  
  468.            dw himap,01,0,5,5
  469.            dw himap,02,0,5,5
  470.            dw himap,03,0,5,5
  471.            dw himap,04,0,5,5
  472.            dw himap,05,0,5,5
  473.            dw himap,06,0,5,5
  474.            dw himap,07,0,5,5
  475.            dw himap,08,0,5,5
  476.            dw himap,09,0,5,5
  477.            dw himap,10,0,5,5
  478.            dw himap,11,0,5,5
  479.            dw himap,12,0,5,5
  480.            dw himap,13,0,5,5
  481.            dw himap,14,0,5,5
  482.            dw himap,15,0,5,5
  483.            dw himap,16,0,5,5
  484.            dw himap,17,0,5,5
  485.            dw himap,18,0,5,5
  486.            dw himap,19,0,5,5
  487.            dw himap,20,0,5,5
  488.            dw himap,21,0,5,5
  489.            dw himap,22,0,5,5
  490.            dw himap,23,0,5,5
  491.            dw himap,24,0,5,5
  492.            dw himap,25,0,5,5
  493.            dw himap,26,0,5,5
  494.            dw himap,27,0,5,5
  495.            dw himap,28,0,5,5
  496.            dw himap,29,0,5,5
  497.            dw himap,30,0,5,5
  498.            dw himap,31,0,5,5
  499.            dw himap,32,0,5,5
  500.            dw himap,33,0,5,5
  501.            dw himap,34,0,5,5
  502.            dw himap,35,0,5,5
  503.            dw himap,36,0,5,5
  504.            dw himap,37,0,5,5
  505.            dw himap,38,0,5,5
  506.            dw himap,39,0,5,5
  507.            dw himap,40,0,5,5
  508.            dw himap,41,0,5,5
  509.            dw himap,42,0,5,5
  510.            dw himap,43,0,5,5
  511.            dw himap,44,0,5,5
  512.  
  513.            dw himap,0,0,30,30 ; center, change to lomap and see!
  514.  
  515. cube3b     dw 44  ; this is same as above but since bitmaps can't be seen
  516.            dw 44  ; from far, i use the same cube with points instead.
  517.            dw 25 dup (0)  ; future use
  518.            ;    x   y   z
  519.            dw -70, 70, 70 ;1  ; this is an example of how to use the
  520.            dw -70, 70, 35 ;2  ; different resolutions based on distance
  521.            dw -70, 70,  0 ;3  ; you could get rid of half of these points
  522.            dw -70, 70,-35 ;4  ; and still have it "look" the same because
  523.  
  524.            dw -70,-70, 70 ;5  ; of the great distance at which this will
  525.            dw -70,-70, 35 ;6  ; be seen
  526.            dw -70,-70,  0 ;7
  527.            dw -70,-70,-35 ;8
  528.  
  529.            dw  70,-70, 70 ;9
  530.            dw  70,-70, 35 ;10
  531.            dw  70,-70,  0 ;11
  532.            dw  70,-70,-35 ;12
  533.  
  534.            dw  70, 70, 70 ;13
  535.            dw  70, 70, 35 ;14
  536.            dw  70, 70,  0 ;15
  537.            dw  70, 70,-35 ;16
  538.  
  539.            dw -70, 70,-70 ;17
  540.            dw -70, 35,-70 ;18
  541.            dw -70,  0,-70 ;19
  542.            dw -70,-35,-70 ;20
  543.            dw -70,-70,-70 ;21
  544.  
  545.            dw  70, 70,-70 ;22
  546.            dw  70, 35,-70 ;23
  547.            dw  70,  0,-70 ;24
  548.            dw  70,-35,-70 ;25
  549.            dw  70,-70,-70 ;26
  550.  
  551.            dw -70, 35, 70 ;27
  552.            dw -70,  0, 70 ;28
  553.            dw -70,-35, 70 ;29
  554.  
  555.            dw  70, 35, 70 ;30
  556.            dw  70,  0, 70 ;31
  557.            dw  70,-35, 70 ;32
  558.  
  559.            dw -35,-70, 70 ;33
  560.            dw   0,-70, 70 ;34
  561.            dw  35,-70, 70 ;35
  562.  
  563.            dw -35,-70,-70 ;36
  564.            dw   0,-70,-70 ;37
  565.            dw  35,-70,-70 ;38
  566.  
  567.            dw -35, 70,-70 ;39
  568.            dw   0, 70,-70 ;40
  569.            dw  35, 70,-70 ;41
  570.  
  571.            dw -35, 70, 70 ;42
  572.            dw   0, 70, 70 ;43
  573.            dw  35, 70, 70 ;44
  574.  
  575.            dw 0,0,0,28,0, 01,01
  576.            dw 0,0,0,28,0, 02,02
  577.            dw 0,0,0,28,0, 03,03
  578.            dw 0,0,0,28,0, 04,04
  579.            dw 0,0,0,28,0, 05,05
  580.            dw 0,0,0,28,0, 06,06
  581.            dw 0,0,0,28,0, 07,07
  582.            dw 0,0,0,28,0, 08,08
  583.            dw 0,0,0,28,0, 09,09
  584.            dw 0,0,0,28,0, 10,10
  585.            dw 0,0,0,28,0, 11,11
  586.            dw 0,0,0,28,0, 12,12
  587.            dw 0,0,0,28,0, 13,13
  588.            dw 0,0,0,28,0, 14,14
  589.            dw 0,0,0,28,0, 15,15
  590.            dw 0,0,0,28,0, 16,16
  591.            dw 0,0,0,28,0, 17,17
  592.            dw 0,0,0,28,0, 18,18
  593.            dw 0,0,0,28,0, 19,19
  594.            dw 0,0,0,28,0, 20,20
  595.            dw 0,0,0,28,0, 21,21
  596.            dw 0,0,0,28,0, 22,22
  597.            dw 0,0,0,28,0, 23,23
  598.            dw 0,0,0,28,0, 24,24
  599.            dw 0,0,0,28,0, 25,25
  600.            dw 0,0,0,28,0, 26,26
  601.            dw 0,0,0,28,0, 27,27
  602.            dw 0,0,0,28,0, 28,28
  603.            dw 0,0,0,28,0, 29,29
  604.            dw 0,0,0,28,0, 30,30
  605.            dw 0,0,0,28,0, 31,31
  606.            dw 0,0,0,28,0, 32,32
  607.            dw 0,0,0,28,0, 33,33
  608.            dw 0,0,0,28,0, 34,34
  609.            dw 0,0,0,28,0, 35,35
  610.            dw 0,0,0,28,0, 36,36
  611.            dw 0,0,0,28,0, 37,37
  612.            dw 0,0,0,28,0, 38,38
  613.            dw 0,0,0,28,0, 39,39
  614.            dw 0,0,0,28,0, 40,40
  615.            dw 0,0,0,28,0, 41,41
  616.            dw 0,0,0,28,0, 42,42
  617.            dw 0,0,0,28,0, 43,43
  618.            dw 0,0,0,28,0, 44,44
  619.  
  620.            dw himap,0,0,30,30     ; 0 = center of object
  621.  
  622. headerring dd -1
  623.            dd offset ringa - offset $ - 4
  624.  
  625. ringa      dw 32
  626.            dw 32
  627.            dw 25 dup (0)  ; future use
  628.            ;    x   y   z
  629.            dw -40*4, 80*4, 30*4 ; 1
  630.            dw -80*4, 40*4, 30*4 ; 2
  631.            dw -80*4,-40*4, 30*4 ; 3
  632.            dw -40*4,-80*4, 30*4 ; 4
  633.            dw  40*4,-80*4, 30*4 ; 5
  634.            dw  80*4,-40*4, 30*4 ; 6
  635.            dw  80*4, 40*4, 30*4 ; 7
  636.            dw  40*4, 80*4, 30*4 ; 8
  637.            dw -40*4, 20*4, 45*4 ; 9
  638.            dw -40*4,-20*4, 45*4 ;10
  639.            dw -20*4,-40*4, 45*4 ;11
  640.            dw  20*4,-40*4, 45*4 ;12
  641.            dw  40*4,-20*4, 45*4 ;13
  642.            dw  40*4, 20*4, 45*4 ;14
  643.            dw  20*4, 40*4, 45*4 ;15
  644.            dw -20*4, 40*4, 45*4 ;16
  645.            dw -40*4, 80*4,-30*4 ;17
  646.            dw -80*4, 40*4,-30*4 ;18
  647.            dw -80*4,-40*4,-30*4 ;19
  648.            dw -40*4,-80*4,-30*4 ;20
  649.            dw  40*4,-80*4,-30*4 ;21
  650.            dw  80*4,-40*4,-30*4 ;22
  651.            dw  80*4, 40*4,-30*4 ;23
  652.            dw  40*4, 80*4,-30*4 ;24
  653.            dw -40*4, 20*4,-45*4 ;25
  654.            dw -40*4,-20*4,-45*4 ;26
  655.            dw -20*4,-40*4,-45*4 ;27
  656.            dw  20*4,-40*4,-45*4 ;28
  657.            dw  40*4,-20*4,-45*4 ;29
  658.            dw  40*4, 20*4,-45*4 ;30
  659.            dw  20*4, 40*4,-45*4 ;31
  660.            dw -20*4, 40*4,-45*4 ;32
  661.  
  662.            dw 0,shade,0,16*3+0,0 ,2,9,16,1,2     ,0,0,0 ; these  zeros   get   filled
  663.            dw 0,shade,0,16*3+0,0 ,3,10,9,2,3     ,0,0,0 ; with the calculated surface
  664.            dw 0,shade,0,16*3+0,0 ,4,11,10,3,4    ,0,0,0 ; normal.  we could calculate
  665.            dw 0,shade,0,16*3+0,0 ,5,12,11,4,5    ,0,0,0 ; them ourselves but god, too
  666.            dw 0,shade,0,16*3+0,0 ,6,13,12,5,6    ,0,0,0 ; much work.
  667.            dw 0,shade,0,16*3+0,0 ,7,14,13,6,7    ,0,0,0
  668.            dw 0,shade,0,16*3+0,0 ,8,15,14,7,8    ,0,0,0 ; remember, if you remove  the
  669.            dw 0,shade,0,16*3+0,0 ,1,16,15,8,1    ,0,0,0 ; shading parameter  then  you
  670.            dw 0,shade,0,16*3+0,0 ,1,17,18,2,1    ,0,0,0 ; must remove these 0's
  671.            dw 0,shade,0,16*3+0,0 ,2,18,19,3,2    ,0,0,0
  672.            dw 0,shade,0,16*3+0,0 ,3,19,20,4,3    ,0,0,0
  673.            dw 0,shade,0,16*3+0,0 ,4,20,21,5,4    ,0,0,0
  674.            dw 0,shade,0,16*3+0,0 ,5,21,22,6,5    ,0,0,0
  675.            dw 0,shade,0,16*3+0,0 ,6,22,23,7,6    ,0,0,0
  676.            dw 0,shade,0,16*3+0,0 ,7,23,24,8,7    ,0,0,0
  677.            dw 0,shade,0,16*3+0,0 ,8,24,17,1,8    ,0,0,0
  678.            dw 0,shade,0,16*3+0,0 ,10,26,25,9,10  ,0,0,0
  679.            dw 0,shade,0,16*3+0,0 ,11,27,26,10,11 ,0,0,0
  680.            dw 0,shade,0,16*3+0,0 ,12,28,27,11,12 ,0,0,0
  681.            dw 0,shade,0,16*3+0,0 ,13,29,28,12,13 ,0,0,0
  682.            dw 0,shade,0,16*3+0,0 ,14,30,29,13,14 ,0,0,0
  683.            dw 0,shade,0,16*3+0,0 ,15,31,30,14,15 ,0,0,0
  684.            dw 0,shade,0,16*3+0,0 ,15,16,32,31,15 ,0,0,0
  685.            dw 0,shade,0,16*3+0,0 ,32,16,9,25,32  ,0,0,0
  686.            dw 0,shade,0,16*3+0,0 ,18,25,26,19,18 ,0,0,0
  687.            dw 0,shade,0,16*3+0,0 ,19,26,27,20,19 ,0,0,0
  688.            dw 0,shade,0,16*3+0,0 ,20,27,28,21,20 ,0,0,0
  689.            dw 0,shade,0,16*3+0,0 ,21,28,29,22,21 ,0,0,0
  690.            dw 0,shade,0,16*3+0,0 ,22,29,30,23,22 ,0,0,0
  691.            dw 0,shade,0,16*3+0,0 ,23,30,31,24,23 ,0,0,0
  692.            dw 0,shade,0,16*3+0,0 ,24,31,32,17,24 ,0,0,0
  693.            dw 0,shade,0,16*3+0,0 ,17,32,25,18,17 ,0,0,0
  694.  
  695. headerdiamond dd -1
  696.               dd offset diamonda - offset $ - 4
  697.  
  698. diamonda   dw 13
  699.            dw 17
  700.            dw 25 dup (0)  ; future use
  701.  
  702.            dw -100*4,  50*4,   0
  703.            dw -100*4, -50*4,   0
  704.            dw  -50*4,-100*4,   0
  705.            dw   50*4,-100*4,   0
  706.            dw  100*4, -50*4,   0
  707.            dw  100*4,  50*4,   0
  708.            dw   50*4, 100*4,   0
  709.            dw  -50*4, 100*4,   0
  710.            dw  -50*4,  50*4,  40*4
  711.            dw  -50*4, -50*4,  40*4
  712.            dw   50*4, -50*4,  40*4
  713.            dw   50*4,  50*4,  40*4
  714.            dw    0*4,   0*4,-120*4
  715.  
  716.            dw 0,shade+stone,0,1*0,0 ,1,2,10,9,1,0,0,0
  717.            dw 0,shade+stone,0,1*0,0 ,10,3,4,11,10,0,0,0
  718.            dw 0,shade+stone,0,1*0,0 ,12,11,5,6,12,0,0,0
  719.            dw 0,shade+stone,0,1*0,0 ,8,9,12,7,8,0,0,0
  720.            dw 0,shade+stone,0,1*0,0 ,2,3,10,2,0,0,0
  721.            dw 0,shade+stone,0,1*0,0 ,11,4,5,11,0,0,0
  722.            dw 0,shade+stone,0,1*0,0 ,7,12,6,7,0,0,0
  723.            dw 0,shade+stone,0,1*0,0 ,1,9,8,1,0,0,0
  724.            dw 0,shade+stone,0,1*0,0 ,9,10,11,12,9,0,0,0
  725.            dw 0,shade+stone,0,1*0,0 ,8,13,1,8,0,0,0
  726.            dw 0,shade+stone,0,1*0,0 ,1,13,2,1,0,0,0
  727.            dw 0,shade+stone,0,1*0,0 ,2,13,3,2,0,0,0
  728.            dw 0,shade+stone,0,1*0,0 ,3,13,4,3,0,0,0
  729.            dw 0,shade+stone,0,1*0,0 ,4,13,5,4,0,0,0
  730.            dw 0,shade+stone,0,1*0,0 ,5,13,6,5,0,0,0
  731.            dw 0,shade+stone,0,1*0,0 ,6,13,7,6,0,0,0
  732.            dw 0,shade+stone,0,1*0,0 ,7,13,8,7,0,0,0
  733.  
  734. headerrubine dd -1
  735.              dd offset rubinea - offset $ - 4
  736.  
  737. rubinea    dw 16
  738.            dw 20 ; 18 sides + 1 gosub + 1 return
  739.            dw 25 dup (0)  ; future use
  740.  
  741.            dw -100*4,  50*4,   0*4 ; 1
  742.            dw -100*4, -50*4,   0*4 ; 2
  743.            dw  -50*4,-100*4,   0*4 ; 3
  744.            dw   50*4,-100*4,   0*4 ; 4
  745.            dw  100*4, -50*4,   0*4 ; 5
  746.            dw  100*4,  50*4,   0*4 ; 6
  747.            dw   50*4, 100*4,   0*4 ; 7
  748.            dw  -50*4, 100*4,   0*4 ; 8
  749.            dw  -50*4,  50*4,  40*4 ; 9
  750.            dw  -50*4, -50*4,  40*4 ;10
  751.            dw   50*4, -50*4,  40*4 ;11
  752.            dw   50*4,  50*4,  40*4 ;12
  753.            dw  -50*4,  50*4, -40*4 ;13
  754.            dw  -50*4, -50*4, -40*4 ;14
  755.            dw   50*4, -50*4, -40*4 ;15
  756.            dw   50*4,  50*4, -40*4 ;16
  757.  
  758.            dw 0,shade,0,16+0,0 ,1,2,10,9,1     ,0,0,0 ; these surfaces are tested 1st
  759.            dw 0,shade,0,16+0,0 ,10,3,4,11,10   ,0,0,0
  760.            dw 0,shade,0,16+0,0 ,12,11,5,6,12   ,0,0,0
  761.            dw 0,shade,0,16+0,0 ,8,9,12,7,8     ,0,0,0
  762.            dw 0,shade,0,16+0,0 ,2,3,10,2       ,0,0,0
  763.  
  764.            dw gosub,offset example_of_a_subroutine - offset $
  765.  
  766.            dw 0,shade,0,16+0,0 ,11,4,5,11      ,0,0,0 ; these surfaces are tested last
  767.            dw 0,shade,0,16+0,0 ,7,12,6,7       ,0,0,0
  768.            dw 0,shade,0,16+0,0 ,1,9,8,1        ,0,0,0
  769.            dw 0,shade,0,16+0,0 ,9,10,11,12,9   ,0,0,0
  770.            dw 0,shade,0,16+0,0 ,6,5,15,16,6    ,0,0,0
  771.            dw 0,shade,0,16+0,0 ,15,4,3,14,15   ,0,0,0 ; object exits here...
  772.  
  773. example_of_a_subroutine:
  774.            dw 0,shade,0,16+0,0 ,16,15,14,13,16 ,0,0,0 ; these surfaces are tested 2nd
  775.            dw 0,shade,0,16+0,0 ,13,14,2,1,13   ,0,0,0
  776.            dw 0,shade,0,16+0,0 ,7,16,13,8,7    ,0,0,0
  777.            dw 0,shade,0,16+0,0 ,5,4,15,5       ,0,0,0
  778.            dw 0,shade,0,16+0,0 ,14,3,2,14      ,0,0,0
  779.            dw 0,shade,0,16+0,0 ,8,13,1,8       ,0,0,0
  780.            dw 0,shade,0,16+0,0 ,6,16,7,6       ,0,0,0
  781.            dw return
  782.  
  783. ; This  object  is  an  example   of   how   to  use  the  iteration  command.
  784. ; Notice how  there  are  only   6 main  surfaces  and  then  5  sub  surfaces.
  785. ; If the main surface is not visible,then the sub surfaces are totally skipped.
  786. ; Pre_cal_lambert calculates the code offsets in case side is not visible,  but
  787. ; I have provided a few to give you an example of what pre_cal_lambert will do.
  788.  
  789. ; This demonstrates only one level of iteration, you can have as  many
  790. ; levels as you want.  Notice how sub iterations are written just like
  791. ; main objects.
  792.  
  793. ; Concave surfaces work well when put inside iterations (saves cpu time), but
  794. ; convex surfaces don't work well. eg, insides  of  volcanos  are  great  for
  795. ; cutting cpu time, but exterior things like rooftop buildings must  be  done
  796. ; seperatly (Hint - Inlay the rooftop building below the edge of the roof and
  797. ; you can now have the building and all the stuff on the roof in a iteration)
  798.  
  799. ; Iterations save MEGA cpu time!!!
  800.  
  801.            align 16
  802.  
  803. headercube4 dd -1                        ; -1=end flag (last resolution)
  804.             dd offset cube4a - offset $ - 4
  805.  
  806. cube4a     dw 8           ; how many points
  807.            dw 6           ; how many surfaces
  808.            dw 25 dup (0)  ; future use
  809.            ;    x   y   z
  810.            dw -70*4, 70*4, 70*4 ;1 ; the main cube (defines exterior for checking)
  811.            dw -70*4,-70*4, 70*4 ;2
  812.            dw  70*4,-70*4, 70*4 ;3
  813.            dw  70*4, 70*4, 70*4 ;4
  814.            dw -70*4, 70*4,-70*4 ;5
  815.            dw -70*4,-70*4,-70*4 ;6
  816.            dw  70*4,-70*4,-70*4 ;7
  817.            dw  70*4, 70*4,-70*4 ;8
  818.  
  819.            dw check+iterate,0,0,0,0,1,2,3,1 ; test main surface, dont plot, just check dot product
  820.  
  821.                dw 4 ; 4 extra points if visible    (for this iteration, doesn't
  822.                dw 5 ; 5 extra surfaces if visible   include iterations of iterations)
  823.  
  824.                dw 0 ; reserved for offset of new startup location if failure - directs code to next valid surface
  825.                dw 0 ; reserved for TOTAL number of points to skip if failure - ends up as 4, number of points within iteration
  826.  
  827.                dw 23 dup (0) ; for future use
  828.  
  829.                ;    x   y   z
  830.                dw -45*4, 45*4, 70*4 ; 9
  831.                dw -45*4,-45*4, 70*4 ;10
  832.                dw  45*4,-45*4, 70*4 ;11
  833.                dw  45*4, 45*4, 70*4 ;12
  834.  
  835.                ; these sides are always visible (both) because the above  check
  836.                ; confirmed the dot product.  setting "both" option saves time for
  837.                ; checking each surface because the main surface was  visible.
  838.                ; this saves 2 imuls per surface. eg: check the  main  surface
  839.                ; for visibility and all sub surfaces must also be visible.
  840.  
  841.                dw both,glow ,0, 16*4+0,0,9,10,11,12,9, 0,0,0 ; glow is inverse gouraud shading, what the heck, lets get creative...
  842.                dw both,shade,0, 16*3+0,0,1,2,10,9,1  ,0,0,0
  843.                dw both,last ,0, 16*3+0,0,2,3,11,10,2        ; last = use previous colour (uses gourad)
  844.                dw both,last ,0, 16*3+0,0,3,4,12,11,3        ; previous surface must always
  845.                dw both,last ,0, 16*3+0,0,4,1,9,12,4         ; be visible if this is used
  846.  
  847.            dw check+iterate,0,0,0,0 ,8,7,6,8 ; testing visibility only requires a triangle, not whole surface
  848.  
  849.                dw 4 ; same as above but different points used...
  850.                dw 5
  851.  
  852.                dw 25 dup (0)
  853.  
  854.                ;    x   y   z
  855.                dw -45*4, 45*4,-70*4 ;13
  856.                dw -45*4,-45*4,-70*4 ;14
  857.                dw  45*4,-45*4,-70*4 ;15
  858.                dw  45*4, 45*4,-70*4 ;16
  859.  
  860.                dw both,glow ,0,16*2+0,0,13,16,15,14,13, 0,0,0
  861.                dw both,shade,0,16*7+0,0,5,13,14,6,5   , 0,0,0
  862.                dw both,last ,0,16*7+0,0,6,14,15,7,6
  863.                dw both,last ,0,16*7+0,0,7,15,16,8,7
  864.                dw both,last ,0,16*7+0,0,8,16,13,5,8
  865.  
  866.            dw check+iterate,0,0,0,0 ,4,3,7,4
  867.  
  868.                dw 4 ; concave side, notice how I use the commands below because
  869.                dw 5 ; we know this side is concave.
  870.  
  871.                dw 25 dup (0)
  872.  
  873.                ;    x   y   z
  874.                dw  30*4, 45*4, 45*4 ;17 - make x=70 and plane will be flat
  875.                dw  30*4,-45*4, 45*4 ;18
  876.                dw  30*4,-45*4,-45*4 ;19
  877.                dw  30*4, 45*4,-45*4 ;20
  878.  
  879.                dw both,shade,0,16*6+0,0 ,17,18,19,20,17, 0,0,0
  880.                dw 0,   shade,0,16*9+0,0 ,4,3,18,17,4,  0,0,0 ; <-commands here, i have removed
  881.                dw 0,   shade,0,16*9+0,0 ,3,7,19,18,3,  0,0,0 ; "both", 'cause these sides are not
  882.                dw 0,   shade,0,16*9+0,0 ,8,20,19,7,8,  0,0,0 ; on the same plane as the original
  883.                dw 0,   shade,0,16*9+0,0 ,8,4,17,20,8,  0,0,0 ; iteration check
  884.  
  885.            dw check+iterate,0,0,0,0 ,5,6,2,5
  886.  
  887.                dw 4 ; another concave side
  888.                dw 5
  889.  
  890.                dw 25 dup (0)
  891.  
  892.                ;    x   y   z
  893.                dw -30*4, 45*4, 45*4 ;21 ; points are accumulated from original.
  894.                dw -30*4,-45*4, 45*4 ;22 ; eg: <-this point will always be point #22
  895.                dw -30*4,-45*4,-45*4 ;23 ; regardless of whether the above iterations
  896.                dw -30*4, 45*4,-45*4 ;24 ; were processed.
  897.  
  898.                dw both,shade,0, 16* 2+0,0,21,24,23,22,21, 0,0,0
  899.                dw 0   ,shade,0, 16* 8+0,0,1,21,22,2,1,  0,0,0
  900.                dw 0   ,shade,0, 16* 8+0,0,5,24,21,1,5,  0,0,0
  901.                dw 0   ,shade,0, 16* 8+0,0,6,23,24,5,6,  0,0,0
  902.                dw 0   ,shade,0, 16* 8+0,0,6,2,22,23,6,  0,0,0
  903.  
  904.           dw check+iterate,0,0,0,0 ,5,1,4,5
  905.  
  906.                dw 4
  907.                dw 5
  908.  
  909.                dw 25 dup (0)
  910.  
  911.                ;    x   y   z
  912.                dw -45*4, 70*4,-45*4 ;25
  913.                dw -45*4, 70*4, 45*4 ;26
  914.                dw  45*4, 70*4, 45*4 ;27
  915.                dw  45*4, 70*4,-45*4 ;28
  916.  
  917.                dw both,glow    ,0, 16*2+0,0,25,26,27,28,25, 0,0,0
  918.                dw both,shade   ,0, 16*3+0,0,5,1,26,25,5,    0,0,0
  919.                dw both,last    ,0, 16*3+0,0,1,4,27,26,1
  920.                dw both,last    ,0, 16*3+0,0,4,8,28,27,4
  921.                dw both,last    ,0, 16*3+0,0,8,5,25,28,8
  922.  
  923.            dw check+iterate,0,0,0,0 ,2,6,7,2
  924.  
  925.                dw 4
  926.                dw 5
  927.  
  928.                dw 25 dup (0)
  929.  
  930.                ;    x   y   z
  931.                dw -45*4,-70*4,-45*4 ;29
  932.                dw -45*4,-70*4, 45*4 ;30
  933.                dw  45*4,-70*4, 45*4 ;31
  934.                dw  45*4,-70*4,-45*4 ;32
  935.  
  936.                dw both,glow ,0,16*5 +0,0,29,32,31,30,29, 0,0,0
  937.                dw both,shade,0,16*2 +0,0,6,29,30,2,6,    0,0,0
  938.                dw both,last ,0,16*2 +0,0,2,30,31,3,2
  939.                dw both,last ,0,16*2 +0,0,3,31,32,7,3
  940.                dw both,last ,0,16*2 +0,0,7,32,29,6,7
  941.  
  942.            align 16
  943.  
  944. headerarm  dd -1
  945.            dd offset cheaparma - offset $ - 4
  946.  
  947. cheaparma  dw 8           ; how many points
  948.            dw 12          ; how many surfaces
  949.            dw 25 dup (0)  ; future use
  950.            ;    x   y   z
  951.            dw -70*4, 25*4, 110*4 ;1
  952.            dw -70*4,-25*4, 110*4 ;2
  953.            dw  70*4,-25*4, 110*4 ;3
  954.            dw  70*4, 25*4, 110*4 ;4
  955.            dw -70*4, 25*4,-110*4 ;5
  956.            dw -70*4,-25*4,-110*4 ;6
  957.            dw  70*4,-25*4,-110*4 ;7
  958.            dw  70*4, 25*4,-110*4 ;8
  959.  
  960.            dw normal,shade+mesh,0,16*3 ,0 ,1,2,3,4,1  ,0,0,0
  961.            dw normal,shade+mesh,0,16*3 ,0 ,8,7,6,5,8  ,0,0,0
  962.            dw normal,shade+mesh,0,16*3 ,0 ,4,3,7,8,4  ,0,0,0
  963.            dw normal,shade+mesh,0,16*3 ,0 ,5,6,2,1,5  ,0,0,0
  964.           dw normal,shade+mesh,0,16*3 ,0 ,5,1,4,8,5  ,0,0,0
  965.            dw normal,shade+mesh,0,16*3 ,0 ,2,6,7,3,2  ,0,0,0
  966.            dw push_location
  967.            dw push_matrix
  968.            dw sub_object ; this is the same as dw matrix+check+iterate+both,0,0,0,0,0,0
  969.  
  970.                     dw 8           ; how many points
  971.                     dw 6           ; how many surfaces
  972.  
  973.                     dw 0,0         ; reserved, offset of total skip, number of points to skip
  974.                     dw 0           ; flag, +1=is there a point offset below0
  975.                     dw 100,520,0    ; point offset
  976.                     dw 1           ; new matrix load location
  977.                     dw 9           ; point addition for connection data (all points are now point+8, eg 1+8,2+8...)
  978.                     dd 5000000     ; maximum distance object is seen
  979.                     dd 200         ; minimum distance object is seen
  980.                     dd 300         ; tolerancing for x/y max/min
  981.  
  982.                     dw 11 dup (0)  ; future use
  983.                     ;    x   y   z
  984.                     dw -35*4, 30*4, 30*4 ;10
  985.                     dw -35*4,-30*4, 30*4 ;11
  986.                     dw  20*4,-30*4, 30*4 ;12
  987.                     dw  20*4, 30*4, 30*4 ;13
  988.                     dw -35*4, 20*4,-20*4 ;14
  989.                     dw -35*4,-20*4,-20*4 ;15
  990.                     dw  40*4,-20*4,-20*4 ;16
  991.                     dw  40*4, 20*4,-20*4 ;17
  992.  
  993.                     dw normal,shade,0,16*4 ,0 ,1,2,3,4,1  ,0,0,0
  994.                     dw normal,shade,0,16*4 ,0 ,8,7,6,5,8  ,0,0,0
  995.                     dw normal,shade,0,16*4 ,0 ,4,3,7,8,4  ,0,0,0
  996.                     dw normal,shade,0,16*4 ,0 ,5,6,2,1,5  ,0,0,0
  997.                    dw normal,shade,0,16*4 ,0 ,5,1,4,8,5  ,0,0,0
  998.                     dw normal,shade,0,16*4 ,0 ,2,6,7,3,2  ,0,0,0
  999.  
  1000.            dw pop_matrix
  1001.            dw pop_location
  1002.            dw sub_object ; this is the same as dw matrix+check+iterate+both,0,0,0,0,0,0
  1003.  
  1004.                     dw 8           ; how many points
  1005.                     dw 6           ; how many surfaces
  1006.  
  1007.                     dw 0,0         ; reserved
  1008.                     dw 0           ; reserved
  1009.                     dw -100,-530,0   ; point offset
  1010.                     dw 2           ; new matrix load location
  1011.                     dw 18          ; connection addition (base)
  1012.  
  1013.                     dw 17 dup (0)  ; future use
  1014.                     ;    x   y   z
  1015.                     dw -40*4, 40*4, 30*4 ;19
  1016.                     dw -40*4,-40*4, 30*4 ;20
  1017.                     dw  20*4,-40*4, 30*4 ;21
  1018.                     dw  20*4, 40*4, 30*4 ;21
  1019.                     dw -30*4, 20*4,-50*4 ;22
  1020.                     dw -30*4,-20*4,-50*4 ;23
  1021.                     dw  40*4,-20*4,-50*4 ;24
  1022.                     dw  40*4, 20*4,-50*4 ;25
  1023.  
  1024.                     dw normal,shade,0,16*6 ,0 ,1,2,3,4,1  ,0,0,0
  1025.                     dw normal,shade,0,16*6 ,0 ,8,7,6,5,8  ,0,0,0
  1026.                     dw normal,shade,0,16*6 ,0 ,4,3,7,8,4  ,0,0,0
  1027.                     dw normal,shade,0,16*6 ,0 ,5,6,2,1,5  ,0,0,0
  1028.                    dw normal,shade,0,16*6 ,0 ,5,1,4,8,5  ,0,0,0
  1029.                     dw normal,shade,0,16*6 ,0 ,2,6,7,3,2  ,0,0,0
  1030.  
  1031. ; This is the same object as the boxes above but without  the  main  box.
  1032. ; notice how it starts with 0 points!  the entire object simply points to
  1033. ; other sub-objects.
  1034.  
  1035. headerarm2 dd -1
  1036.            dd offset cheaparma2 - offset $ - 4
  1037.  
  1038. cheaparma2 dw 0           ; how many points
  1039.            dw 6           ; how many surfaces
  1040.            dw 25 dup (0)  ; future use
  1041.  
  1042.            dw push_location
  1043.            dw push_matrix
  1044.            dw sub_object ; this is the same as dw matrix+check+iterate,0,0,0,0,0,0
  1045.  
  1046.                     dw 8           ; how many points
  1047.                     dw 6           ; how many surfaces
  1048.  
  1049.                     dw 0,0         ; reserved, offset of total skip, number of points to skip
  1050.                     dw 0           ; flag, +1=is there a point offset below0
  1051.                     dw 20,130,0    ; point offset
  1052.                     dw 1           ; new matrix load location
  1053.                     dw 1
  1054.  
  1055.                     dw 17 dup (0)  ; future use
  1056.                     ;    x   y   z
  1057.                     dw -35, 30, 30 ;2
  1058.                     dw -35,-30, 30 ;3
  1059.                     dw  20,-30, 30 ;4
  1060.                     dw  20, 30, 30 ;5
  1061.                     dw -35, 20,-20 ;6
  1062.                     dw -35,-20,-20 ;7
  1063.                     dw  40,-20,-20 ;8
  1064.                     dw  40, 20,-20 ;9
  1065.  
  1066.                     dw normal,shade,0,16*4 ,0 ,1+0,2+0,3+0,4+0,1+0  ,0,0,0
  1067.                     dw normal,shade,0,16*4 ,0 ,8+0,7+0,6+0,5+0,8+0  ,0,0,0
  1068.                     dw normal,shade,0,16*4 ,0 ,4+0,3+0,7+0,8+0,4+0  ,0,0,0
  1069.                     dw normal,shade,0,16*4 ,0 ,5+0,6+0,2+0,1+0,5+0  ,0,0,0
  1070.                    dw normal,shade,0,16*4 ,0 ,5+0,1+0,4+0,8+0,5+0  ,0,0,0
  1071.                     dw normal,shade,0,16*4 ,0 ,2+0,6+0,7+0,3+0,2+0  ,0,0,0
  1072.  
  1073.            dw pop_matrix
  1074.            dw pop_location
  1075.            dw sub_object ; this is the same as dw matrix+check+iterate,0,0,0,0,0,0
  1076.  
  1077.                     dw 8           ; how many points
  1078.                     dw 6           ; how many surfaces
  1079.  
  1080.                     dw 0,0         ; reserved
  1081.                     dw 0
  1082.                     dw 20,-120,0   ; point offset
  1083.                     dw 2           ; new matrix load location
  1084.                     dw 2
  1085.  
  1086.                     dw 17 dup (0)  ; future use
  1087.                     ;    x   y   z
  1088.                     dw -40, 40, 30 ;11
  1089.                     dw -40,-40, 30 ;12
  1090.                     dw  20,-40, 30 ;13
  1091.                     dw  20, 40, 30 ;14
  1092.                     dw -30, 20,-50 ;15
  1093.                     dw -30,-20,-50 ;16
  1094.                     dw  40,-20,-50 ;17
  1095.                     dw  40, 20,-50 ;18
  1096.  
  1097.                     dw normal,shade,0,16*8 ,0 ,1+8*1,2+8*1,3+8*1,4+8*1,1+8*1  ,0,0,0
  1098.                     dw normal,shade,0,16*8 ,0 ,8+8*1,7+8*1,6+8*1,5+8*1,8+8*1  ,0,0,0
  1099.                     dw normal,shade,0,16*8 ,0 ,4+8*1,3+8*1,7+8*1,8+8*1,4+8*1  ,0,0,0
  1100.                     dw normal,shade,0,16*8 ,0 ,5+8*1,6+8*1,2+8*1,1+8*1,5+8*1  ,0,0,0
  1101.                    dw normal,shade,0,16*8 ,0 ,5+8*1,1+8*1,4+8*1,8+8*1,5+8*1  ,0,0,0
  1102.                     dw normal,shade,0,16*8 ,0 ,2+8*1,6+8*1,7+8*1,3+8*1,2+8*1  ,0,0,0
  1103.  
  1104. archmiddle dd -1
  1105.            dd offset arch1 - offset $ - 4
  1106.  
  1107. arch1      dw 20
  1108.            dw 10
  1109.            dw 0,0,0,0,0,0,0,0
  1110.            dw 17 dup (0)
  1111.  
  1112.            dw  402, 240,-100 ; 1
  1113.            dw  402, 240, 100 ; 2
  1114.            dw  402,-240,-100 ; 3
  1115.            dw  402,-240, 100 ; 4
  1116.            dw -402,-240,-100 ; 5
  1117.            dw -402,-240, 100 ; 6
  1118.            dw -402, 240,-100 ; 7
  1119.            dw -402, 240, 100 ; 8
  1120.  
  1121.            dw -330, 100,-100 ; 9
  1122.            dw -330, 100, 100 ; 10
  1123.            dw -250,  50,-100 ; 11
  1124.            dw -250,  50, 100 ; 12
  1125.            dw -100,   0,-100 ; 13
  1126.            dw -100,   0, 100 ; 14
  1127.            dw   50,  50,-100 ; 15
  1128.            dw   50,  50, 100 ; 16
  1129.            dw  130, 100,-100 ; 17
  1130.            dw  130, 100, 100 ; 18
  1131.            dw  200, 240,-100 ; 19
  1132.            dw  200, 240, 100 ; 20
  1133.  
  1134.            dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1135.  
  1136.                 dw 0
  1137.                 dw 6
  1138.                 dw 25 dup (0)
  1139.  
  1140.                 dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1141.                 dw both,0,0,16*6+7,0 ,17,3,15,17
  1142.                 dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1143.                 dw both,0,0,16*6+7,0 ,13,5,11,13
  1144.                 dw both,0,0,16*6+7,0 ,11,5,9,11
  1145.                 dw both,0,0,16*6+7,0 ,9,5,7,9
  1146.  
  1147.            dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1148.  
  1149.                 dw 0
  1150.                 dw 6
  1151.                 dw 0,0,0,0,0,0,0,1
  1152.                 dw 17 dup (0)
  1153.  
  1154.                 dw both,0,0,16*6+14,0 ,1,3,17,19,1
  1155.                 dw both,0,0,16*6+14,0 ,17,3,15,17
  1156.                 dw both,0,0,16*6+14,0 ,15,3,5,13,15
  1157.                 dw both,0,0,16*6+14,0 ,13,5,11,13
  1158.                 dw both,0,0,16*6+14,0 ,11,5,9,11
  1159.                 dw both,0,0,16*6+14,0 ,9,5,7,9
  1160.  
  1161.            dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1162.            dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1163.  
  1164.            dw 0,0,0,16*6+13,0, 7,8,10,9,7
  1165.            dw 0,0,0,16*6+12,0, 9,10,12,11,9
  1166.            dw 0,0,0,16*6+11,0, 11,12,14,13,11
  1167.            dw 0,0,0,16*6+ 9,0, 13,14,16,15,13
  1168.            dw 0,0,0,16*6+ 7,0, 15,16,18,17,15
  1169.            dw 0,0,0,16*6+ 6,0, 17,18,20,19,17
  1170.  
  1171. archmiddl6 dd -1
  1172.            dd offset arch6 - offset $ - 4
  1173.  
  1174. arch6      dw 20
  1175.            dw 10
  1176.            dw 0,0,0,0,0,0,0,0
  1177.            dw 17 dup (0)
  1178.  
  1179.            dw -100, 240,-402; 1
  1180.            dw  100, 240,-402; 2
  1181.            dw -100,-240,-402; 3
  1182.            dw  100,-240,-402; 4
  1183.            dw -100,-240, 402; 5
  1184.            dw  100,-240, 402; 6
  1185.            dw -100, 240, 402; 7
  1186.            dw  100, 240, 402; 8
  1187.  
  1188.            dw -100, 100, 330; 9
  1189.            dw  100, 100, 330; 10
  1190.            dw -100,  50, 250; 11
  1191.            dw  100,  50, 250; 12
  1192.            dw -100,   0, 100; 13
  1193.            dw  100,   0, 100; 14
  1194.            dw -100,  50, -50; 15
  1195.            dw  100,  50, -50; 16
  1196.            dw -100, 100,-130; 17
  1197.            dw  100, 100,-130; 18
  1198.            dw -100, 240,-200; 19
  1199.            dw  100, 240,-200; 20
  1200.  
  1201.            dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1202.  
  1203.                 dw 0
  1204.                 dw 6
  1205.                 dw 25 dup (0)
  1206.  
  1207.                 dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1208.                 dw both,0,0,16*6+7,0 ,17,3,15,17
  1209.                 dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1210.                 dw both,0,0,16*6+7,0 ,13,5,11,13
  1211.                 dw both,0,0,16*6+7,0 ,11,5,9,11
  1212.                 dw both,0,0,16*6+7,0 ,9,5,7,9
  1213.  
  1214.            dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1215.  
  1216.                 dw 0
  1217.                 dw 6
  1218.                 dw 0,0,0,0,0,0,0,1
  1219.                 dw 17 dup (0)
  1220.  
  1221.                 dw both,0,0,16*6+14,0 ,1,3,17,19,1
  1222.                 dw both,0,0,16*6+14,0 ,17,3,15,17
  1223.                 dw both,0,0,16*6+14,0 ,15,3,5,13,15
  1224.                 dw both,0,0,16*6+14,0 ,13,5,11,13
  1225.                 dw both,0,0,16*6+14,0 ,11,5,9,11
  1226.                 dw both,0,0,16*6+14,0 ,9,5,7,9
  1227.  
  1228.            dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1229.            dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1230.  
  1231.            dw 0,0,0,16*6+13,0, 7,8,10,9,7
  1232.            dw 0,0,0,16*6+12,0, 9,10,12,11,9
  1233.            dw 0,0,0,16*6+11,0, 11,12,14,13,11
  1234.            dw 0,0,0,16*6+ 9,0, 13,14,16,15,13
  1235.            dw 0,0,0,16*6+ 7,0, 15,16,18,17,15
  1236.            dw 0,0,0,16*6+ 6,0, 17,18,20,19,17
  1237.  
  1238. archmiddl3 dd -1
  1239.            dd offset arch3 - offset $ - 4
  1240.  
  1241. arch3      dw 20
  1242.            dw 10
  1243.            dw 0,0,0,0,0,0,0,0
  1244.            dw 17 dup (0)
  1245.  
  1246.            dw -402, 240, 100 ; 1
  1247.            dw -402, 240,-100 ; 2
  1248.            dw -402,-240, 100 ; 3
  1249.            dw -402,-240,-100 ; 4
  1250.            dw  402,-240, 100 ; 5
  1251.            dw  402,-240,-100 ; 6
  1252.            dw  402, 240, 100 ; 7
  1253.            dw  402, 240,-100 ; 8
  1254.  
  1255.            dw  330, 100, 100 ; 9
  1256.            dw  330, 100,-100 ; 10
  1257.            dw  250,  50, 100 ; 11
  1258.            dw  250,  50,-100 ; 12
  1259.            dw  100,   0, 100 ; 13
  1260.            dw  100,   0,-100 ; 14
  1261.            dw  -50,  50, 100 ; 15
  1262.            dw  -50,  50,-100 ; 16
  1263.            dw -130, 100, 100 ; 17
  1264.            dw -130, 100,-100 ; 18
  1265.            dw -200, 240, 100 ; 19
  1266.            dw -200, 240,-100 ; 20
  1267.  
  1268.            dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1269.  
  1270.                 dw 0
  1271.                 dw 6
  1272.                 dw 25 dup (0)
  1273.  
  1274.                 dw both,0,0,16*6+14,0 ,1,3,17,19,1
  1275.                 dw both,0,0,16*6+14,0 ,17,3,15,17
  1276.                 dw both,0,0,16*6+14,0 ,15,3,5,13,15
  1277.                 dw both,0,0,16*6+14,0 ,13,5,11,13
  1278.                 dw both,0,0,16*6+14,0 ,11,5,9,11
  1279.                 dw both,0,0,16*6+14,0 ,9,5,7,9
  1280.  
  1281.            dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1282.  
  1283.                 dw 0
  1284.                 dw 6
  1285.                 dw 0,0,0,0,0,0,0,1
  1286.                 dw 17 dup (0)
  1287.  
  1288.                 dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1289.                 dw both,0,0,16*6+7,0 ,17,3,15,17
  1290.                 dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1291.                 dw both,0,0,16*6+7,0 ,13,5,11,13
  1292.                 dw both,0,0,16*6+7,0 ,11,5,9,11
  1293.                 dw both,0,0,16*6+7,0 ,9,5,7,9
  1294.  
  1295.            dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1296.            dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1297.  
  1298.            dw 0,0,0,16*6+ 5,0, 7,8,10,9,7
  1299.            dw 0,0,0,16*6+ 6,0, 9,10,12,11,9
  1300.            dw 0,0,0,16*6+ 8,0, 11,12,14,13,11
  1301.            dw 0,0,0,16*6+10,0, 13,14,16,15,13
  1302.            dw 0,0,0,16*6+11,0, 15,16,18,17,15
  1303.            dw 0,0,0,16*6+13,0, 17,18,20,19,17
  1304.  
  1305. archmiddl4 dd -1
  1306.            dd offset arch4 - offset $ - 4
  1307.  
  1308. arch4      dw 20
  1309.            dw 10
  1310.            dw 0,0,0,0,0,0,0,0
  1311.            dw 17 dup (0)
  1312.  
  1313.            dw  100, 240, 402 ; 1
  1314.            dw -100, 240, 402 ; 2
  1315.            dw  100,-240, 402 ; 3
  1316.            dw -100,-240, 402 ; 4
  1317.            dw  100,-240,-402 ; 5
  1318.            dw -100,-240,-402 ; 6
  1319.            dw  100, 240,-402 ; 7
  1320.            dw -100, 240,-402 ; 8
  1321.  
  1322.            dw  100, 100,-330 ; 9
  1323.            dw -100, 100,-330 ; 10
  1324.            dw  100,  50,-250 ; 11
  1325.            dw -100,  50,-250 ; 12
  1326.            dw  100,   0,-100 ; 13
  1327.            dw -100,   0,-100 ; 14
  1328.            dw  100,  50,  50 ; 15
  1329.            dw -100,  50,  50 ; 16
  1330.            dw  100, 100, 130 ; 17
  1331.            dw -100, 100, 130 ; 18
  1332.            dw  100, 240, 200 ; 19
  1333.            dw -100, 240, 200 ; 20
  1334.  
  1335.            dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1336.  
  1337.                 dw 0
  1338.                 dw 6
  1339.                 dw 25 dup (0)
  1340.  
  1341.                 dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1342.                 dw both,0,0,16*6+7,0 ,17,3,15,17
  1343.                 dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1344.                 dw both,0,0,16*6+7,0 ,13,5,11,13
  1345.                 dw both,0,0,16*6+7,0 ,11,5,9,11
  1346.                 dw both,0,0,16*6+7,0 ,9,5,7,9
  1347.  
  1348.            dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1349.  
  1350.                 dw 0
  1351.                 dw 6
  1352.                 dw 0,0,0,0,0,0,0,1
  1353.                 dw 17 dup (0)
  1354.  
  1355.                 dw both,0,0,16*6+14,0 ,1,3,17,19,1
  1356.                 dw both,0,0,16*6+14,0 ,17,3,15,17
  1357.                 dw both,0,0,16*6+14,0 ,15,3,5,13,15
  1358.                 dw both,0,0,16*6+14,0 ,13,5,11,13
  1359.                 dw both,0,0,16*6+14,0 ,11,5,9,11
  1360.                 dw both,0,0,16*6+14,0 ,9,5,7,9
  1361.  
  1362.            dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1363.            dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1364.  
  1365.            dw 0,0,0,16*6+13,0, 7,8,10,9,7
  1366.            dw 0,0,0,16*6+12,0, 9,10,12,11,9
  1367.            dw 0,0,0,16*6+11,0, 11,12,14,13,11
  1368.            dw 0,0,0,16*6+ 9,0, 13,14,16,15,13
  1369.            dw 0,0,0,16*6+ 7,0, 15,16,18,17,15
  1370.            dw 0,0,0,16*6+ 6,0, 17,18,20,19,17
  1371.  
  1372. archend    dd -1
  1373.            dd offset arch2 - offset $ - 4
  1374.  
  1375. arch2      dw 21
  1376.            dw 11
  1377.            dw 0,0,0,0,0,0,0,0
  1378.            dw 17 dup (0)
  1379.  
  1380.            dw  402, 240,-100 ; 1
  1381.            dw  402, 240, 100 ; 2
  1382.            dw  402,-240,-100 ; 3
  1383.            dw  402,-240, 100 ; 4
  1384.            dw -402,-240,-100 ; 5
  1385.            dw -402,-240, 100 ; 6
  1386.            dw -402, 240,-100 ; 7
  1387.            dw -402, 240, 100 ; 8
  1388.  
  1389.            dw -330, 100,-100 ; 9
  1390.            dw -330, 100, 100 ; 10
  1391.            dw -250,  50,-100 ; 11
  1392.            dw -250,  50, 100 ; 12
  1393.            dw -100,   0,-100 ; 13
  1394.            dw -100,   0, 100 ; 14
  1395.            dw   50,  50,-100 ; 15
  1396.            dw   50,  50, 100 ; 16
  1397.            dw  130, 100,-100 ; 17
  1398.            dw  130, 100, 100 ; 18
  1399.            dw  200, 240,-100 ; 19
  1400.            dw  200, 240, 100 ; 20
  1401.  
  1402.            dw  200,-240, 100 ; 21
  1403.  
  1404.            dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1405.  
  1406.                 dw 0
  1407.                 dw 6
  1408.                 dw 25 dup (0)
  1409.  
  1410.                 dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1411.                 dw both,0,0,16*6+7,0 ,17,3,15,17
  1412.                 dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1413.                 dw both,0,0,16*6+7,0 ,13,5,11,13
  1414.                 dw both,0,0,16*6+7,0 ,11,5,9,11
  1415.                 dw both,0,0,16*6+7,0 ,9,5,7,9
  1416.  
  1417.            dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1418.  
  1419.                 dw 0
  1420.                 dw 6
  1421.                 dw 0,0,0,0,0,0,0,1
  1422.                 dw 17 dup (0)
  1423.  
  1424.                 dw both,0,0,16*6+14,0 ,20,17,19,20
  1425.                 dw both,0,0,16*6+14,0 ,17,20,15,17
  1426.                 dw both,0,0,16*6+14,0 ,15,20,5,13,15
  1427.                 dw both,0,0,16*6+14,0 ,13,5,11,13
  1428.                 dw both,0,0,16*6+14,0 ,11,5,9,11
  1429.                 dw both,0,0,16*6+14,0 ,9,5,7,9
  1430.  
  1431.            dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1432.            dw 0,0,0,16*6+4,0,  1,19,20,2,1
  1433.            dw 0,0,0,16*6+7,0,  1,2,4,3,1
  1434.  
  1435.            dw 0,0,0,16*6+13,0, 7,8,10,9,7
  1436.            dw 0,0,0,16*6+12,0, 9,10,12,11,9
  1437.            dw 0,0,0,16*6+11,0, 11,12,14,13,11
  1438.            dw 0,0,0,16*6+ 9,0, 13,14,16,15,13
  1439.            dw 0,0,0,16*6+ 7,0, 15,16,18,17,15
  1440.            dw 0,0,0,16*6+ 6,0, 17,18,20,19,17
  1441.  
  1442. column     dd -1
  1443.            dd offset colmn1 - offset $ - 4
  1444.  
  1445. colmn1     dw 16
  1446.            dw 8
  1447.            dw 0,0,0,0,0,0,0,0
  1448.            dw 17 dup (0)
  1449.  
  1450.            dw  32,-450,-80 ; 1
  1451.            dw  80,-450,-32 ; 2
  1452.            dw  80,-450, 32 ; 3
  1453.            dw  32,-450, 80 ; 4
  1454.            dw -32,-450, 80 ; 5
  1455.            dw -80,-450, 32 ; 6
  1456.            dw -80,-450,-32 ; 7
  1457.            dw -32,-450,-80 ; 8
  1458.            dw  32, 450,-80 ; 9
  1459.            dw  80, 450,-32 ;10
  1460.            dw  80, 450, 32 ;11
  1461.            dw  32, 450, 80 ;12
  1462.            dw -32, 450, 80 ;13
  1463.            dw -80, 450, 32 ;14
  1464.            dw -80, 450,-32 ;15
  1465.            dw -32, 450,-80 ;16
  1466.  
  1467.            dw 0,0,0,16*3+ 6,0, 1,8,16,9,1
  1468.            dw 0,0,0,16*3+ 8,0, 2,1,9,10,2
  1469.            dw 0,0,0,16*3+10,0, 3,2,10,11,3
  1470.            dw 0,0,0,16*3+12,0, 4,3,11,12,4
  1471.            dw 0,0,0,16*3+14,0, 5,4,12,13,5
  1472.            dw 0,0,0,16*3+11,0, 6,5,13,14,6
  1473.            dw 0,0,0,16*3+ 9,0, 7,6,14,15,7
  1474.            dw 0,0,0,16*3+ 7,0, 8,7,15,16,8
  1475.  
  1476. fourdrums  dd -1
  1477.            dd offset oil4   - offset $ - 4
  1478.  
  1479. oil4       dw 0
  1480.            dw 4
  1481.            dw 25 dup (0)
  1482.  
  1483.            dw static_sub_object
  1484.  
  1485.                   dw 16
  1486.                   dw 9
  1487.                   dw 0,0,0
  1488.                   dw 2000,0,-2000
  1489.                   dw 0,0
  1490.                   dw 17 dup (0)
  1491.  
  1492.                   dw  290,-350,-700 ; 1
  1493.                   dw  700,-350,-290 ; 2
  1494.                   dw  700,-350, 290 ; 3
  1495.                   dw  290,-350, 700 ; 4
  1496.                   dw -290,-350, 700 ; 5
  1497.                   dw -700,-350, 290 ; 6
  1498.                   dw -700,-350,-290 ; 7
  1499.                   dw -290,-350,-700 ; 8
  1500.                   dw  290, 350,-700 ; 9
  1501.                   dw  700, 350,-290 ;10
  1502.                   dw  700, 350, 290 ;11
  1503.                   dw  290, 350, 700 ;12
  1504.                   dw -290, 350, 700 ;13
  1505.                   dw -700, 350, 290 ;14
  1506.                   dw -700, 350,-290 ;15
  1507.                   dw -290, 350,-700 ;16
  1508.  
  1509.                   dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1510.                   dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1511.                   dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1512.                   dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1513.                   dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1514.                   dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1515.                   dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1516.                   dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1517.                   dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1518.  
  1519.            dw static_sub_object
  1520.  
  1521.                   dw 16
  1522.                   dw 9
  1523.                   dw 0,0,0
  1524.                   dw 0,0,4000
  1525.                   dw 0,16
  1526.                   dw 17 dup (0)
  1527.  
  1528.                   dw  290,-350,-700 ; 1
  1529.                   dw  700,-350,-290 ; 2
  1530.                   dw  700,-350, 290 ; 3
  1531.                   dw  290,-350, 700 ; 4
  1532.                   dw -290,-350, 700 ; 5
  1533.                   dw -700,-350, 290 ; 6
  1534.                   dw -700,-350,-290 ; 7
  1535.                   dw -290,-350,-700 ; 8
  1536.                   dw  290, 350,-700 ; 9
  1537.                   dw  700, 350,-290 ;10
  1538.                   dw  700, 350, 290 ;11
  1539.                   dw  290, 350, 700 ;12
  1540.                   dw -290, 350, 700 ;13
  1541.                   dw -700, 350, 290 ;14
  1542.                   dw -700, 350,-290 ;15
  1543.                   dw -290, 350,-700 ;16
  1544.  
  1545.                   dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1546.                   dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1547.                   dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1548.                   dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1549.                   dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1550.                   dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1551.                   dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1552.                   dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1553.                   dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1554.  
  1555.            dw static_sub_object
  1556.  
  1557.                   dw 16
  1558.                   dw 9
  1559.                   dw 0,0,0
  1560.                   dw -4000,0,0
  1561.                   dw 0,32
  1562.                   dw 17 dup (0)
  1563.  
  1564.                   dw  290,-350,-700 ; 1
  1565.                   dw  700,-350,-290 ; 2
  1566.                   dw  700,-350, 290 ; 3
  1567.                   dw  290,-350, 700 ; 4
  1568.                   dw -290,-350, 700 ; 5
  1569.                   dw -700,-350, 290 ; 6
  1570.                   dw -700,-350,-290 ; 7
  1571.                   dw -290,-350,-700 ; 8
  1572.                   dw  290, 350,-700 ; 9
  1573.                   dw  700, 350,-290 ;10
  1574.                   dw  700, 350, 290 ;11
  1575.                   dw  290, 350, 700 ;12
  1576.                   dw -290, 350, 700 ;13
  1577.                   dw -700, 350, 290 ;14
  1578.                   dw -700, 350,-290 ;15
  1579.                   dw -290, 350,-700 ;16
  1580.  
  1581.                   dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1582.                   dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1583.                   dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1584.                   dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1585.                   dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1586.                   dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1587.                   dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1588.                   dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1589.                   dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1590.  
  1591.            dw static_sub_object
  1592.  
  1593.                   dw 16
  1594.                   dw 9
  1595.                   dw 0,0,0
  1596.                   dw 0,0,-4000
  1597.                   dw 0,48
  1598.                   dw 17 dup (0)
  1599.  
  1600.                   dw  290,-350,-700 ; 1
  1601.                   dw  700,-350,-290 ; 2
  1602.                   dw  700,-350, 290 ; 3
  1603.                   dw  290,-350, 700 ; 4
  1604.                   dw -290,-350, 700 ; 5
  1605.                   dw -700,-350, 290 ; 6
  1606.                   dw -700,-350,-290 ; 7
  1607.                   dw -290,-350,-700 ; 8
  1608.                   dw  290, 350,-700 ; 9
  1609.                   dw  700, 350,-290 ;10
  1610.                   dw  700, 350, 290 ;11
  1611.                   dw  290, 350, 700 ;12
  1612.                   dw -290, 350, 700 ;13
  1613.                   dw -700, 350, 290 ;14
  1614.                   dw -700, 350,-290 ;15
  1615.                   dw -290, 350,-700 ;16
  1616.  
  1617.                   dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1618.                   dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1619.                   dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1620.                   dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1621.                   dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1622.                   dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1623.                   dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1624.                   dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1625.                   dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1626.  
  1627. bigoildrum dd -1
  1628.            dd offset oil1   - offset $ - 4
  1629.  
  1630. oil1       dw 16
  1631.            dw 9
  1632.            dw 0,0,0,0,0,0,0,0
  1633.            dw 17 dup (0)
  1634.  
  1635.            dw  290,-350,-700 ; 1
  1636.            dw  700,-350,-290 ; 2
  1637.            dw  700,-350, 290 ; 3
  1638.            dw  290,-350, 700 ; 4
  1639.            dw -290,-350, 700 ; 5
  1640.            dw -700,-350, 290 ; 6
  1641.            dw -700,-350,-290 ; 7
  1642.            dw -290,-350,-700 ; 8
  1643.            dw  290, 350,-700 ; 9
  1644.            dw  700, 350,-290 ;10
  1645.            dw  700, 350, 290 ;11
  1646.            dw  290, 350, 700 ;12
  1647.            dw -290, 350, 700 ;13
  1648.            dw -700, 350, 290 ;14
  1649.            dw -700, 350,-290 ;15
  1650.            dw -290, 350,-700 ;16
  1651.  
  1652.            dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1653.            dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1654.            dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1655.            dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1656.            dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1657.            dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1658.            dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1659.            dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1660.            dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1661.  
  1662.            align 16
  1663.  
  1664. futurecrewrip1:
  1665.            dd -1
  1666.            dd offset fcrip1 - offset $ - 4
  1667.  
  1668. fcrip1:    dw 17
  1669.            dw 12
  1670.            dw 25 dup (0)
  1671.  
  1672.            dw -200, 130,-200
  1673.            dw  200, 130,-200
  1674.            dw  200, 130, 200
  1675.            dw -200, 130, 200
  1676.            dw -110,   0,-110
  1677.            dw  -55,   5,-110
  1678.            dw   55,   5,-110
  1679.            dw  110,   0,-110
  1680.            dw  110,   5, -55
  1681.            dw  110,   5,  55
  1682.            dw  110,   0, 110
  1683.            dw   55,   5, 110
  1684.            dw  -55,   5, 110
  1685.            dw -110,   0, 110
  1686.            dw -110,   5,  55
  1687.            dw -110,   5, -55
  1688.            dw    0,-280,   0
  1689.  
  1690.            dw double,0,0,16*3+11,16*1+ 3, 1,2,8,5,1
  1691.            dw double,0,0,16*3+14,16*1+ 5, 2,3,11,8,2
  1692.            dw double,0,0,16*3+ 8,16*1+ 7, 3,4,14,11,3
  1693.            dw double,0,0,16*3+ 4,16*1+ 9, 4,1,5,14,4
  1694.            dw double,0,0,16*3+15,16*1+0, 17,5,6,17
  1695.            dw double,0,0,16*3+15,16*1+0, 17,7,8,17
  1696.            dw double,0,0,16*3+12,16*1+2, 17,8,9,17
  1697.            dw double,0,0,16*3+12,16*1+2, 17,10,11,17
  1698.            dw double,0,0,16*3+ 9,16*1+4, 17,11,12,17
  1699.            dw double,0,0,16*3+ 9,16*1+4, 17,13,14,17
  1700.            dw double,0,0,16*3+ 6,16*1+6, 17,14,15,17
  1701.            dw double,0,0,16*3+ 6,16*1+6, 17,16,5,17
  1702.  
  1703.